// Copyright (c) 2016 Chef Software Inc. and/or applicable contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

.hab-origin {
  &--left {
    @include span-columns(8);

    .pkg-container {
      @include span-columns(8 of 8);
      padding: rem(10);
      border-bottom: 1px solid $light-gray;
    }

    .pkg-col-1 {
      text-align: left;
      @include span-columns(4 of 8);
    }

    .pkg-col-2 {
      text-align: right;
      @include span-columns(2 of 8);
    }

    .pkg-col-3 {
      text-align: right;
      @include span-columns(2 of 8);
      @include omega();
    }

    .disabled-settings {
      opacity: 0.2;
    }

    .origin-package-item {
      border: 1px solid $light-gray;
      border-color: $hab-blue-light;
      border-radius: $global-radius;
      color: inherit;
      display: block;
      margin-bottom: 0.5em;
      padding: 1em 1.5em;
      position: relative;

      a {
        position: static;
        border: 0;
        padding: 0;
        margin: 0;
        display: inline;
      }
    }
  }

  &--right {
    @include span-columns(4);
    border-left: 1px solid $light-gray;
    padding-left: $base-spacing;
  }

  &--deny-delete {
    background-color: $hab-red;
    color: $off-white;
    padding: $small-spacing;
    text-align: center;
  }

  &--pkgs-link.button {
    @include primary-button;
    float: right;
  }

  &--key-list {
    margin-bottom: rem(60);

    > h3 {
      margin-bottom: rem(30);
    }
  }

  &--pkg-list {
    margin-top: rem(30);
  }
}

.hab-key-list {
  &--list {
    margin-top: $base-spacing;
  }
}

.hab-key-add-form {
  @include shadow-float-more;
  border-radius: $global-radius;
  margin-bottom: rem(30);
  padding: rem(20);

  &--close {
    float: right;
  }

  &--label {
    color: $hab-gray-dark;
    font-size: rem(16);
    margin-top: $base-spacing;
  }

  &--submit {
    @include outer-container;
  }

  &--save {
    @include span-columns(4);
    margin-top: 0;
  }

  &--errors {
    @include span-columns(8);
    @include omega;
    color: $hab-red;
    font-size: $error-font;
  }
}

.hab-origin-members-tab {
  &--section {
    margin-bottom: rem(60);

    > h3 {
      margin-bottom: rem(30);
    }

    &.invite-members > h3 {
      margin-bottom: rem(10);
    }
  }

  &--submit {
     @include outer-container;
  }

  &--save {
    @include span-columns(4);
    margin-top: 0;
  }

  &--errors {
    @include span-columns(8);
    @include omega;
    color: $hab-red;
    font-size: $error-font;
  }
}

.hab-origins-list {
  margin-bottom: rem(30);
}
